/**
 * 当点击页面时，若是弹出窗口，则将此窗口通过父级方法提高层次到最前方
 */

var id = null;

$( "body" ).ready( function( e )
{
	if( location.href.indexOf( "id=" ) != -1 )
	{
		var ps = param( location.href );
		id = ps.id;

		$( document ).click( documentClickHandler );
	}
} );

function documentClickHandler( e )
{
	if( id != null )
	{
		parent.layer_call( id );
	}
}

function close_this_model()
{
	if( id != null )
	{
		parent.close_model( id );
	}
}
